<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">

        var kongw = {
            id: 1,
            name: '孔皮皮',
            age: 18
        }

        console.log(kongw)
        console.log("........")

        var str = JSON.stringify(kongw)
        console.log(str)

        var jsonStr = JSON.parse(str)
        console.log(jsonStr)

        class Person {
            name;
            age;

            constructor(name, age) {
                this.name = name;
                this.age = age;
            }

            add() {
                console.log("123")
            }

            say() {
                return "hello";
            }

        }

        var p = new Person()
        var pc = new Person("kongwg","kk")

        console.log(pc)

        p.add()
        var ps = p.say()
        console.log(ps)


    </script>
</head>
<body>

</body>
</html>